RuntimeDomain

class RuntimeDomain : Domain

Runtime domain exposes JavaScript runtime by means of remote evaluation and mirror objects. Evaluation results are returned as mirror object that expose object type, string representation and unique identifier that can be used for further object reference. Original objects are maintained in memory unless they are either explicitly released or are released along with the other objects in their object group.

Functions

addBinding
Link copied to clipboard
fun addBinding(input: AddBindingRequest): Single<RequestResponseFrame>
If executionContextId is empty, adds binding with the given name on the global objects of all inspected contexts, including those created later, bindings survive reloads.
awaitPromise
Link copied to clipboard
fun awaitPromise(input: AwaitPromiseRequest): Single<AwaitPromiseResponse>
Add handler to promise with given promise object id.
bindingCalled
Link copied to clipboard
fun bindingCalled(): Flowable<BindingCalledEvent>
Notification is issued every time when binding is called.
callFunctionOn
Link copied to clipboard
fun callFunctionOn(input: CallFunctionOnRequest): Single<CallFunctionOnResponse>
Calls function with given declaration on the given object.
compileScript
Link copied to clipboard
fun compileScript(input: CompileScriptRequest): Single<CompileScriptResponse>
Compiles expression.
consoleAPICalled
Link copied to clipboard
fun consoleAPICalled(): Flowable<ConsoleAPICalledEvent>
Issued when console API was called.
description
Link copied to clipboard
fun description(): String
Returns domain description.
disable
Link copied to clipboard
fun disable(): Single<RequestResponseFrame>
Disables reporting of execution contexts creation.
discardConsoleEntries
Link copied to clipboard
fun discardConsoleEntries(): Single<RequestResponseFrame>
Discards collected exceptions and console API calls.
enable
Link copied to clipboard
fun enable(): Single<RequestResponseFrame>
Enables reporting of execution contexts creation by means of executionContextCreated event.
evaluate
Link copied to clipboard
fun evaluate(input: EvaluateRequest): Single<EvaluateResponse>
Evaluates expression on global object.
events
Link copied to clipboard
fun events(): Flowable<Event>
Returns flowable capturing all domains events.
fun events(filter: Predicate<Event>): Flowable<Event>
Returns flowable capturing all domains events matching predicate.
fun <T : Event> events(eventClass: Class<T>): Flowable<T>
Returns flowable capturing all domain events of a given type.
fun <T : Event> events(eventClass: Class<T>, filter: Predicate<T>): Flowable<T>
Returns flowable capturing all domain events of a given type matching predicate.
exceptionRevoked
Link copied to clipboard
fun exceptionRevoked(): Flowable<ExceptionRevokedEvent>
Issued when unhandled exception was revoked.
exceptionThrown
Link copied to clipboard
fun exceptionThrown(): Flowable<ExceptionThrownEvent>
Issued when exception was thrown and unhandled.
executionContextCreated
Link copied to clipboard
fun executionContextCreated(): Flowable<ExecutionContextCreatedEvent>
Issued when new execution context is created.
executionContextDestroyed
Link copied to clipboard
fun executionContextDestroyed(): Flowable<ExecutionContextDestroyedEvent>
Issued when execution context is destroyed.
executionContextsCleared
Link copied to clipboard
fun executionContextsCleared(): Flowable<RawEvent>
Issued when all executionContexts were cleared in browser
getDependencies
Link copied to clipboard
open fun getDependencies(): List<Domain>
Returns domain dependencies.
getHeapUsage
Link copied to clipboard
fun getHeapUsage(): Single<GetHeapUsageResponse>
Returns the JavaScript heap usage.
getIsolateId
Link copied to clipboard
fun getIsolateId(): Single<GetIsolateIdResponse>
Returns the isolate id.
getProperties
Link copied to clipboard
fun getProperties(input: GetPropertiesRequest): Single<GetPropertiesResponse>
Returns properties of a given object.
globalLexicalScopeNames
Link copied to clipboard
Returns all let, const and class variables from global scope.
inspectRequested
Link copied to clipboard
fun inspectRequested(): Flowable<InspectRequestedEvent>
Issued when object should be inspected (for example, as a result of inspect() command line API call).
name
Link copied to clipboard
fun name(): String
Returns domain name.
queryObjects
Link copied to clipboard
fun queryObjects(input: QueryObjectsRequest): Single<QueryObjectsResponse>
releaseObject
Link copied to clipboard
fun releaseObject(input: ReleaseObjectRequest): Single<RequestResponseFrame>
Releases remote object with given id.
releaseObjectGroup
Link copied to clipboard
fun releaseObjectGroup(input: ReleaseObjectGroupRequest): Single<RequestResponseFrame>
Releases all remote objects that belong to a given group.
removeBinding
Link copied to clipboard
fun removeBinding(input: RemoveBindingRequest): Single<RequestResponseFrame>
This method does not remove binding function from global object but unsubscribes current runtime agent from Runtime.bindingCalled notifications.
runIfWaitingForDebugger
Link copied to clipboard
fun runIfWaitingForDebugger(): Single<RequestResponseFrame>
Tells inspected instance to run if it was waiting for debugger to attach.
runScript
Link copied to clipboard
fun runScript(input: RunScriptRequest): Single<RunScriptResponse>
Runs script with given id in a given context.
setAsyncCallStackDepth
Link copied to clipboard
fun setAsyncCallStackDepth(input: SetAsyncCallStackDepthRequest): Single<RequestResponseFrame>
Enables or disables async call stacks tracking.
setMaxCallStackSizeToCapture
Link copied to clipboard
terminateExecution
Link copied to clipboard
fun terminateExecution(): Single<RequestResponseFrame>
Terminate current or next JavaScript execution.

Sources

jvm source
Link copied to clipboard